import request from '@/utils/request'

/**
 * 下单支付
 * @param {*} param
 * @returns
 */
export const paymentForPet = ({ uid, No, pet_name, pet_price, pet_num, pet_color, pet_place, order_img }) => {
  return request('/order/pay', 'post', { uid, No, pet_name, pet_price, pet_num, pet_color, pet_place, order_img })
}

/**
 *  获取用户订单
 * @param {number}
 * @returns
 */
export const getUserOrder = ({ uid, pagenum }) => {
  return request('/order/getOrder', 'get', { uid, pagenum })
}

/**
 *  用户申请退货
 * @param {number}
 * @returns
 */
export const returnOrder = ({ oid }) => {
  return request('/order/return', 'post', { oid })
}
